#include "SelectServer.hpp"

int main(int argc, char* argv[])
{
    // 参数检查
    if(argc != 2)
    {
        std::cerr << "Usage: " << argv[0] << " <port>" << std::endl;
        exit(USAGE_ERR);
    }
    uint16_t port = atoi(argv[1]);

    Enable_Console_Log_Strategy(); // 启用控制台日志策略
    
    std::unique_ptr<SelectServer> svrptr = std::make_unique<SelectServer>(port); // 创建SelectServer对象

    svrptr->Start(); // SelectServer启动

    return 0; 
}